package app 
{
	import flash.display.MovieClip;
	/**
	 * ...
	 * @author hungconcon
	 */
	public class PlayerManager 
	{
		public var l:Array;
		private var c:MovieClip;
		
		public function PlayerManager(){
			l = new Array();
		}
		private function getm(v:String):MovieClip {
			if (l.length == 0) return null;
			switch (v){
				case "stand0": 	return l[0];
				case "stand1": 	return l[1];
				case "run0": 	return l[2];
				case "run1": 	return l[3];
				case "shoot": 	return l[4];
				default:		return null;
			}
		}
		public function gotoAndStop(v:String):void {
			var a:MovieClip = getm(v);
			if (a == null) return;
			if (c == a) {
				return;
			}
			c = a;
			for (var i:int = 0; i < l.length; i++){
				if (l[i] != a) {
					(l[i] as MovieClip).visible = false;
				}
			}
			a.visible = true;
		}
	}
}